home *** CD-ROM | disk | FTP | other *** search
- /*
- * Button - Demonstration of TransSkel button outlining. Accompanies discussion
- * in TransSkel Programmer's Note 10.
- *
- * Dialog 1 demonstrates how to install an outliner for the button that's
- * indicated as the default in the dialog template, and how to make the
- * outline change state when the button does.
- *
- * Dialog 2 demonstrates how to install an outliner when the button to
- * be outlined isn't necessarily the default, and how to change the button
- * with which the outline is associated.
- *
- * The document window demonstrates simple use of SkelDrawButtonOutline()
- * in a document window.
- *
- * 11 Jan 94 Paul DuBois
- *
- * 11 Jan 94 Release 1.00
- * 21 Feb 94
- * - Updated for TransSkel 3.11.
- */
-
- # include "TransSkel.h"
-
- # include "Button.h"
-
-
- /*
- * Handle selection of "About Button..." item from Apple menu
- */
-
- static pascal void
- DoAppleMenu (short item)
- {
- (void) SkelAlert (aboutAlrtRes, SkelDlogFilter (nil, true),
- skelPositionOnParentDevice);
- SkelRmveDlogFilter ();
- }
- /*
- * Process selection from File menu.
- */
-
- static pascal void
- DoFileMenu (short item)
- {
- switch (item)
- {
- case doDialog1:
- DoDialog1 ();
- break;
- case doDialog2:
- DoDialog2 ();
- break;
- case doDialog3:
- DoDialog3 ();
- break;
- case quitApp:
- SkelStopEventLoop ();
- break;
- }
- }
-
-
-
- int
- main (void)
- {
- MenuHandle m;
-
- SkelInit ((SkelInitParamsPtr) nil); /* initialize */
-
- SkelApple ("\pAbout Button\311", DoAppleMenu);
- m = GetMenu (fileMenuRes);
- (void) SkelMenu (m, DoFileMenu, nil, false, true);
-
- SetupDocument ();
-
- SkelEventLoop ();
-
- SkelCleanup (); /* clean up */
- }
-